//
//  PurchaseCarAnimationTool.h
//  PruchaseCarAnimation
//
//  Created by ooops on 12/23/16.
//  Copyright © 2016 ya. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


//动画完成回调block
typedef void (^animationFinisnBlock)(BOOL finish);

@interface PurchaseCarAnimationTool : NSObject <CAAnimationDelegate>

@property (strong , nonatomic) CALayer *layer;
@property (copy , nonatomic) animationFinisnBlock animationFinisnBlock;

+(instancetype)shareTool;
/**
 *  开始动画
 *
 *  @param view        添加动画的view
 *  @param rect        view 的绝对frame
 *  @param finishPoint 下落的位置
 *  @param completion 动画完成回调
 */
-(void)startAnimationandView:(UIView *)view andRect:(CGRect)rect andFinisnRect:(CGPoint)finishPoint andFinishBlock:(animationFinisnBlock)completion;
/**
 *  摇晃动画
 *
 *  @param shakeView 颤抖啊
 */
+(void)shakeAnimation:(UIView *)shakeView;
@end
